<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="admin_header.jsp"/>

<!-- 主内容区 -->
<main role="main" class="col-md-10 ml-sm-auto px-4">
    <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
        <h1 class="h2">控制台</h1>
        <div class="btn-toolbar mb-2 mb-md-0">
            <div class="btn-group mr-2">
                <a href="../index" class="btn btn-sm btn-outline-secondary">
                    <i class="fas fa-external-link-alt"></i> 访问前台
                </a>
                <a href="../logout" class="btn btn-sm btn-outline-danger" onclick="return confirm('确定要退出登录吗？');">
                    <i class="fas fa-sign-out-alt"></i> 退出登录
                </a>
            </div>
        </div>
    </div>

    <!-- 统计信息卡片 -->
    <div class="row mt-4">
        <div class="col-md-4">
            <div class="card text-white bg-primary mb-3">
                <div class="card-body">
                    <h5 class="card-title">新闻总数</h5>
                    <p class="card-text display-4">${totalNews}</p>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="card text-white bg-success mb-3">
                <div class="card-body">
                    <h5 class="card-title">用户总数</h5>
                    <p class="card-text display-4">${totalUsers}</p>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="card text-white bg-warning mb-3">
                <div class="card-body">
                    <h5 class="card-title">分类总数</h5>
                    <p class="card-text display-4">${totalSorts}</p>
                </div>
            </div>
        </div>
    </div>
</main>
</body>
</html> 